﻿using SqlSugar;

namespace PMIS.WebApi.Model
{
    [SugarTable("sys_user", TableDescription = "用户")]
    public class User: BaseModel
    {
        [SugarColumn(ColumnDescription = "ID", Length = 30, IsPrimaryKey = true)]
        public string Id { get; set; }

        [SugarColumn(ColumnDescription = "用户名", Length = 50)]
        public string UserName { get; set; }

        [SugarColumn(ColumnDescription = "密码", Length = 50)]
        public string Password { get; set; }

        [SugarColumn(ColumnDescription = "姓名", Length = 50)]
        public string RealName { get; set; }

        [SugarColumn(ColumnDescription = "性别", IsNullable = true)]
        public int? Gender { get; set; }

        [SugarColumn(ColumnDescription = "生日", IsNullable = true)]
        public string Birthday { get; set; }

        [SugarColumn(ColumnDescription = "头像", IsNullable = true)]
        public string Avatar { get; set; }

        [SugarColumn(ColumnDescription = "邮箱", IsNullable = true)]
        public string Email { get; set; }

        [SugarColumn(ColumnDescription = "手机号", IsNullable = true)]
        public string Mobile { get; set; }

        [SugarColumn(ColumnDescription = "用户状态", IsNullable = true)]
        public int? Status { get; set; }

        [SugarColumn(ColumnDescription = "备注", IsNullable = true)]
        public string Remark { get; set; }

        [SugarColumn(ColumnDescription = "部门id", IsNullable = true)]
        public string DepartmentId { get; set; }

        [SugarColumn(ColumnDescription = "用户角色", Length = 500, IsNullable = true)]
        public string RoleId { get; set; }

        [SugarColumn(IsIgnore =true)]
        public string DepartmentName { get; set; }

        [SugarColumn(IsIgnore = true)]
        public string PositionIds { get; set; }

        [SugarColumn(ColumnDescription = "租户id", DefaultValue = "0")]
        public int TenantId { get; set; }
    }
}
